package com.farm.farming.dao;

import com.farm.farming.pojo.Cust_User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

@Repository
@Transactional
public interface Cust_UserMapper extends JpaRepository<Cust_User,Integer>, JpaSpecificationExecutor<Cust_User> {


    @Query(value = "update  t_cust_user set password =?2 where id=?1 and type='0'",nativeQuery = true)
    @Modifying
    void update(Integer id, String bCrypt);
}
